﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Mammoth.Entities;
using Mammoth.Repositories;
using Mammoth.Views;
using Mammoth.Views.Transaction;

namespace Mammoth.ViewModels
{
    public class ValasListViewModel : Libs.WPFViewModelBase
    {
        public IList<ValasEntity> ValasList { get; set; }

        IRepository<ValasEntity> repo;

        public ValasListViewModel(IInputElement dispatcher, IRepository<ValasEntity> repo) : base(dispatcher)
        {
            this.repo = repo;
            ValasList = new ObservableCollection<ValasEntity>(repo.Get());
        }

        public void ShowAddValasForm()
        {
            Dispatcher.RaiseNavigationEvent(Events.NavigationType.Show, typeof(AddValasForm));
        }
    }
}
